<template>
  <div class="d-list">
    <Item
      v-for="item in list"
      :key="item.id"
      :dataInfo="item"
      @get-list="emit('getList')"
      @edit-item="editItem"
      @get-id="getId"
    />
  </div>
</template>

<script setup lang="ts">
import Item from './Item.vue'
const emit = defineEmits(['getList', 'editItem', 'getIds'])
const props = defineProps({
  list: {
    type: Array,
    default: () => []
  }
})

const editItem = (e) => {
  emit('editItem', e)
}
const getId = (e) => {
  emit('getIds', e)
}
</script>

<style lang="scss" scoped></style>
